<?php
/**
 * 静态方法的调用
 * 静态调用 static
 * 本类调用 self::
 * 父类调用 parent::
 */
class A {
    public static function foo() {
        static::who();
    }

    public static function who() {
        echo __CLASS__."\n";
    }
}

class B extends A {
    public static function test() {
        A::foo();
        parent::foo();
        self::foo();
        static::foo();
    }

    public static function who() {
        echo __CLASS__."\n";
    }
}
class C extends B {
    public static function who() {
        echo __CLASS__."\n";
    }
}

C::test();
echo "<br/><br/>";
B::test();